package AIRProject.filemanager
{
	import flash.filesystem.File;
	
	import mx.collections.ArrayCollection;
	public class FolderClass extends Object
	{
		
		public var label:String;
		public var path:String;
		public var name:String;
		public var children:Array;
		public var isFolder:uint=0;
		public var fileType:String;
		public var parent:File;
		public var flag:Number;
		public function FolderClass(_path:String=null)
		{
			var file:File=new File(_path);
			
			if(_path!=null)
			{
				label=file.name;
				name=label;
				path=file.url;
				parent=file.parent;
				if(!file.isDirectory)
				{
					isFolder=1;
				}
				var startIndex:int = label.lastIndexOf("/");
				var endIndex:int = label.lastIndexOf(".");
				if(endIndex!=-1)
				{
					fileType=label.substring(endIndex + 1, label.length);
					fileType= fileType.toLowerCase();
					label=label.substr(0,endIndex);
				}
				else
				{
					fileType="unknow";
					
				}
				
			}
		}
	}
}